﻿/* 
Copyright (c) 2009, Aaron Moline <Aaron.Moline@MolineSoftware.com>

Permission is hereby granted, free of charge, to any person 
obtaining a copy of this software and associated documentation 
files (the "Software"), to deal in the Software without restriction, 
including without limitation the rights to use, copy, modify, merge, 
publish, distribute, sublicense, and/or sell copies of the Software, 
and to permit persons to whom the Software is furnished to do so, 
subject to the following conditions:

The above copyright notice and this permission notice shall be 
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
DEALINGS IN THE SOFTWARE.
*/
using CookComputing.XmlRpc;
namespace MolineSoftware.DrupalXmlRpc
{

    /// <summary>
    /// Struct: Drupal Mail Header 
    /// </summary>
    [XmlRpcMissingMapping(MappingAction.Ignore)]
    public struct DrupalMailHeader
    {
        #region | Public Properties |
        /// <summary>
        /// Gets or Sets the email return address.
        /// </summary>
        [XmlRpcMember(Description = "The email return address.", Member = "Return-Path")]
        public string ReturnPath { get; set; }

        /// <summary>
        /// Gets or Sets the from address.
        /// </summary>
        [XmlRpcMember(Description = "the from address.", Member = "From")]
        public string From { get; set; }

        /// <summary>
        /// Gets or Sets the sender's address.
        /// </summary>
        [XmlRpcMember(Description = "The sender's address.", Member = "Sender")]
        public string SenderAddress { get; set; }

        /// <summary>
        /// Gets or Sets the replay address.
        /// </summary>
        [XmlRpcMember(Description = "The replay address.", Member = "Replay-To")]
        public string ReplayAddress { get; set; }

        /// <summary>
        /// Gets or Sets the error address.
        /// </summary>
        [XmlRpcMember(Description = "The error address.", Member = "Errors-To")]
        public string ErrorsAddress { get; set; }

        /// <summary>
        /// Gets or Sets the content encoding.
        /// </summary>
        [XmlRpcMember(Description = "The content encoding.", Member = "Content-Transfer-Encoding")]
        public string ContentEncoding { get; set; }

        /// <summary>
        /// Gets or Sets the mailer - host sending the email.
        /// </summary>
        [XmlRpcMember(Description = "The host that sent the email", Member = "X-Mailer")]
        public string Mailer { get; set; }

        /// <summary>
        /// Gets or sets the MIME version.
        /// </summary>
        [XmlRpcMember(Description = "The MIME version.", Member = "MIME-Version")]
        public string MIMEVersion { get; set; }

        /// <summary>
        /// Gets or Sets the Content Type
        /// </summary>
        [XmlRpcMember(Description = "The email content type.", Member = "Content-Type")]
        public string ContentType { get; set; } 
        #endregion
    }

    /*
[headers] => Array
    (
        [MIME-Version] => 1.0
        [Content-Type] => text/plain; charset=UTF-8; format=flowed; delsp=yes
        [Content-Transfer-Encoding] => 8Bit
        [X-Mailer] => Drupal
        [Errors-To] => someuser@here.com
        [Return-Path] => someuser@here.com
        [Sender] => someuser@here.com
        [Reply-To] => aaron
        [From] => aaron
    )
*/
}
